<template>

  <div style="margin-top: 20px ; width: 100%" >

    <el-tabs v-model="activeName" type="border-card">
      <el-tab-pane label="合同信息" name="1" :disabled="true">
        <user-control :activeName="activeName" @userControlNext="saveActiveName"></user-control>

      </el-tab-pane>
      <el-tab-pane label="附件" name="2" :disabled="true">

        <accessory @accessoryNext="saveActiveName"></accessory>

      </el-tab-pane>
      <el-tab-pane label="付款单" name="3" :disabled="true">

        <payment_order @paymentNext="saveActiveName"></payment_order>

      </el-tab-pane>

    </el-tabs>


  </div>

</template>

<script>

import accessory from "./accessory"
import userControl from "./userControl";
import Payment_order from "./payment_order";

export default {
  name: "index",
  data(){
    return {
      activeName: "1",
    }
  },
  methods: {
    saveActiveName(val){
      this.activeName=val+""
    },
    //下一个步骤
    next() {
      let num = parseInt(this.activeName)
      num++
      if (num >3){
        this.activeName=1+""
      }else {
        this.activeName=num+""
      }
    },
  },
  components:{
    Payment_order,
    accessory,userControl
  }

}
</script>

<style scoped>

</style>
